<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>我的书单 | 程序员小航</title><meta name="author" content="liuzhihang"><meta name="copyright" content="liuzhihang"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="虽有嘉肴，弗食，不知其旨也；虽有至道，弗学，不知其善也。是故学然后知不足，教然后知困。知不足，然后能自反也；知困，然后能自强也。故曰：教学相长也。《兑命》曰：“学学半。”其此之谓乎？         .hexo-douban-tabs {     margin-bottom: 15px;     margin-top: 15px; }  .h">
<meta property="og:type" content="website">
<meta property="og:title" content="我的书单">
<meta property="og:url" content="https://liuzhihang.com/books/index.html">
<meta property="og:site_name" content="程序员小航">
<meta property="og:description" content="虽有嘉肴，弗食，不知其旨也；虽有至道，弗学，不知其善也。是故学然后知不足，教然后知困。知不足，然后能自反也；知困，然后能自强也。故曰：教学相长也。《兑命》曰：“学学半。”其此之谓乎？         .hexo-douban-tabs {     margin-bottom: 15px;     margin-top: 15px; }  .h">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/404/avatar.jpg">
<meta property="article:author" content="liuzhihang">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/404/avatar.jpg"><link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/favicon.ico"><link rel="canonical" href="https://liuzhihang.com/books/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//www.google-analytics.com" crossorigin=""/><link rel="preconnect" href="//pingjs.qq.com"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><meta name="google_site_verification" content="GZshAnnrC-4eCrl5h-e_5Rdk4lOUhRK7ShULoRi2q0E"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><script async="async" src="https://www.googletagmanager.com/gtag/js?id=UA-126394362-1"></script><script>window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-126394362-1');
</script><script>var _mtac = {};
(function() {
    var mta = document.createElement("script");
    mta.src = "//pingjs.qq.com/h5/stats.js?v2.0.4";
    mta.setAttribute("name", "MTAH5");
    mta.setAttribute("sid", "66540676");
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(mta, s);
})();
</script><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: {"path":"search.xml","languages":{"hits_empty":"找不到您查询的内容：${query}"}},
  translate: {"defaultEncoding":2,"translateDelay":0,"msgToTraditionalChinese":"繁","msgToSimplifiedChinese":"簡"},
  noticeOutdate: {"limitDay":730,"position":"top","messagePrev":"It has been","messageNext":"days since the last update, the content of the article may be outdated."},
  highlight: undefined,
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    jQuery: 'https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js',
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/js/jquery.justifiedGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/css/justifiedGallery.min.css'
    },
    fancybox: {
      js: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js',
      css: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: true,
  isanchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: '我的书单',
  isPost: false,
  isHome: false,
  isHighlightShrink: false,
  isToc: false,
  postUpdate: '2021-09-08 17:05:44'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if (GLOBAL_CONFIG_SITE.isHome && /iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><link rel="stylesheet" href="//at.alicdn.com/t/font_1608878_xsf93f0c1a.css"><meta name="generator" content="Hexo 5.2.0"><link rel="alternate" href="/atom.xml" title="程序员小航" type="application/atom+xml">
</head><body><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src= "https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/404/avatar.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data"><div class="data-item is-center"><div class="data-item-link"><a href="/archives/"><div class="headline">文章</div><div class="length-num">145</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/tags/"><div class="headline">标签</div><div class="length-num">55</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/categories/"><div class="headline">分类</div><div class="length-num">31</div></a></div></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><i class="fa-fw fas fa-layer-group"></i><span> 导航</span><i class="fas fa-chevron-down expand hide"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></li><li><a class="site-page child" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></li><li><a class="site-page child" href="/categories/"><i class="fa-fw fas fa-bookmark"></i><span> 分类</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 推荐</span><i class="fas fa-chevron-down expand hide"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/books/"><i class="fa-fw fas fa-book"></i><span> 书单</span></a></li><li><a class="site-page child" href="/movies/"><i class="fa-fw fas fa-film"></i><span> 电影</span></a></li><li><a class="site-page child" href="/games/"><i class="fa-fw fas fa-gamepad"></i><span> 游戏</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/contact/"><i class="fa-fw fas fa-comments"></i><span> 留言板</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-address-book"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-user-circle"></i><span> 关于</span></a></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 其他</span><i class="fas fa-chevron-down expand hide"></i></a><ul class="menus_item_child"><li><a class="site-page child" target="_blank" rel="noopener" href="https://juejin.im/user/1987506650493117"><i class="fa-fw iconfont iconjuejin-1"></i><span> 掘金</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://www.zhihu.com/people/liuzhihang"><i class="fa-fw iconfont iconzhihu1"></i><span> 知乎</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://www.infoq.cn/profile/00B8AE08DA916E/publish"><i class="fa-fw iconfont iconweibiaoti-1"></i><span> InfoQ</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://blog.csdn.net/qq_36535538"><i class="fa-fw iconfont iconcsdn"></i><span> CSDN</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://leetcode-cn.com/u/liuzhihang/"><i class="fa-fw iconfont iconleetcode"></i><span> LeetCode</span></a></li></ul></div></div></div></div><div class="page" id="body-wrap"><header class="not-home-page" id="page-header" style="background-image: url('https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/article/qmlGWIaIgpo-80P5tV.jpg')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">程序员小航</a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><i class="fa-fw fas fa-layer-group"></i><span> 导航</span><i class="fas fa-chevron-down expand hide"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></li><li><a class="site-page child" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></li><li><a class="site-page child" href="/categories/"><i class="fa-fw fas fa-bookmark"></i><span> 分类</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 推荐</span><i class="fas fa-chevron-down expand hide"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/books/"><i class="fa-fw fas fa-book"></i><span> 书单</span></a></li><li><a class="site-page child" href="/movies/"><i class="fa-fw fas fa-film"></i><span> 电影</span></a></li><li><a class="site-page child" href="/games/"><i class="fa-fw fas fa-gamepad"></i><span> 游戏</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/contact/"><i class="fa-fw fas fa-comments"></i><span> 留言板</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-address-book"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-user-circle"></i><span> 关于</span></a></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 其他</span><i class="fas fa-chevron-down expand hide"></i></a><ul class="menus_item_child"><li><a class="site-page child" target="_blank" rel="noopener" href="https://juejin.im/user/1987506650493117"><i class="fa-fw iconfont iconjuejin-1"></i><span> 掘金</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://www.zhihu.com/people/liuzhihang"><i class="fa-fw iconfont iconzhihu1"></i><span> 知乎</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://www.infoq.cn/profile/00B8AE08DA916E/publish"><i class="fa-fw iconfont iconweibiaoti-1"></i><span> InfoQ</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://blog.csdn.net/qq_36535538"><i class="fa-fw iconfont iconcsdn"></i><span> CSDN</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://leetcode-cn.com/u/liuzhihang/"><i class="fa-fw iconfont iconleetcode"></i><span> LeetCode</span></a></li></ul></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="page-site-info"><h1 id="site-title">我的书单</h1></div></header><main class="layout" id="content-inner"><div id="page"><div id="article-container">
    <meta name="referrer" content="no-referrer">


<blockquote>
    <p>虽有嘉肴，弗食，不知其旨也；虽有至道，弗学，不知其善也。是故学然后知不足，教然后知困。知不足，然后能自反也；知困，然后能自强也。故曰：教学相长也。《兑命》曰：“学学半。”其此之谓乎？</p>
</blockquote>

<style>
    
.hexo-douban-tabs {
    margin-bottom: 15px;
    margin-top: 15px;
}

.hexo-douban-tab {
    padding: 5px;
}

.hexo-douban-active {
    background: #657b83;
    color: #fff;
}

.hexo-douban-item {
    padding-bottom: 10px;
    position: relative;
    clear: both;
    min-height: 170px;
    padding: 10px 0;
    border-bottom: 1px #ddd solid;
}

@media screen and (max-width: 600px) {
    .hexo-douban-item {
        width: 100%;
    }
}

.hexo-douban-picture {
    position: absolute;
    left: 0;
    top: 10px;
    width: 100px;
}

.hexo-douban-info {
    padding-left: 120px;
}

.hexo-douban-meta {
    font-size: 12px;
    padding-right: 10px;
}

.hexo-douban-comments {
    font-size: 12px;
}

.hexo-douban-pagination {
    margin-top: 15px;
    text-align: center;
    margin-bottom: 10px;
}

.hexo-douban-button {
    padding: 5px;
}

.hexo-douban-button:hover {
    background: #657b83;
    color: #fff;
}

.hexo-douban-hide {
    display: none;
}

.hexo-douban-show {
    display: block;
}


</style>

<div class="hexo-douban-tabs">
    <a class="hexo-douban-tab" id="hexo-douban-tab1" href="javascript:;"
       rel="external">
        在读
        (0)</a>
    <a class="hexo-douban-tab" id="hexo-douban-tab2" href="javascript:;"
       rel="external">
        想读
        (14)</a>
    <a class="hexo-douban-tab" id="hexo-douban-tab3" href="javascript:;"
       rel="external">
        已读
        (5)</a>
</div>
<div>
    <div id="hexo-douban-item1">
        
        <div class="hexo-douban-pagination">
    <a class="hexo-douban-button hexo-douban-firstpage" href="javascript:;"> 首页</a>
    <a class="hexo-douban-button hexo-douban-previouspage" href="javascript:;">上一页</a>
    <span class="hexo-douban-pagenum">2 / 3</span>
    <a class="hexo-douban-button hexo-douban-nextpage" href="javascript:;">下一页</a>
    <a class="hexo-douban-button hexo-douban-lastpage" href="javascript:;">尾页</a>
</div>
    </div>
    <div id="hexo-douban-item2">
        
        <div class="hexo-douban-item">
    <div class="hexo-douban-picture">
        
            <img src= "https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/loading.gif" data-lazy-src="https://img1.doubanio.com/view/subject/s/public/s32513229.jpg" data-src="https://img1.doubanio.com/view/subject/s/public/s32513229.jpg" referrerPolicy="no-referrer" />
        
    </div>
    <div class="hexo-douban-info">
        <div class="hexo-douban-title"><a target="_blank" href="https://book.douban.com/subject/33474750/"> 浪潮之巅（第四版）（上下册）</a></div>
        <div class="hexo-douban-meta">
        
  
  吴军 / 人民邮电出版社 / 2019-6 / 139.00元

      
        </div>
        <div class="hexo-douban-meta">2020-04-26
      想读 /  企业 科技 历史</div>
        <div class="hexo-douban-comments">
  </div>
    </div>
</div>

        
        <div class="hexo-douban-item">
    <div class="hexo-douban-picture">
        
            <img src= "https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/loading.gif" data-lazy-src="https://img9.doubanio.com/view/subject/s/public/s33531736.jpg" data-src="https://img9.doubanio.com/view/subject/s/public/s33531736.jpg" referrerPolicy="no-referrer" />
        
    </div>
    <div class="hexo-douban-info">
        <div class="hexo-douban-title"><a target="_blank" href="https://book.douban.com/subject/34907497/"> 深入理解Java虚拟机（第3版）</a></div>
        <div class="hexo-douban-meta">
        
  
  周志明 / 机械工业出版社 / 2019-12 / 129.00元

      
        </div>
        <div class="hexo-douban-meta">2020-04-19
      想读 /  JVM java虚拟机 java</div>
        <div class="hexo-douban-comments">
  </div>
    </div>
</div>

        
        <div class="hexo-douban-item">
    <div class="hexo-douban-picture">
        
            <img src= "https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/loading.gif" data-lazy-src="https://img1.doubanio.com/view/subject/s/public/s6340977.jpg" data-src="https://img1.doubanio.com/view/subject/s/public/s6340977.jpg" referrerPolicy="no-referrer" />
        
    </div>
    <div class="hexo-douban-info">
        <div class="hexo-douban-title"><a target="_blank" href="https://book.douban.com/subject/4242172/"> 天才在左 疯子在右</a></div>
        <div class="hexo-douban-meta">
        
  
  高铭 / 武汉大学出版社 / 2010-2 / 29.80元

      
        </div>
        <div class="hexo-douban-meta">2018-09-25
      想读 / </div>
        <div class="hexo-douban-comments">
  </div>
    </div>
</div>

        
        <div class="hexo-douban-item">
    <div class="hexo-douban-picture">
        
            <img src= "https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/loading.gif" data-lazy-src="https://img1.doubanio.com/view/subject/s/public/s25101909.jpg" data-src="https://img1.doubanio.com/view/subject/s/public/s25101909.jpg" referrerPolicy="no-referrer" />
        
    </div>
    <div class="hexo-douban-info">
        <div class="hexo-douban-title"><a target="_blank" href="https://book.douban.com/subject/19969386/"> Java程序性能优化</a></div>
        <div class="hexo-douban-meta">
        
  
  葛一鸣 / 清华大学出版社 / 2012-9-1 / 59.00元

      
        </div>
        <div class="hexo-douban-meta">2018-09-25
      想读 /  java 编程 程序设计 多线程</div>
        <div class="hexo-douban-comments">
  </div>
    </div>
</div>

        
        <div class="hexo-douban-item">
    <div class="hexo-douban-picture">
        
            <img src= "https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/loading.gif" data-lazy-src="https://img9.doubanio.com/view/subject/s/public/s29520124.jpg" data-src="https://img9.doubanio.com/view/subject/s/public/s29520124.jpg" referrerPolicy="no-referrer" />
        
    </div>
    <div class="hexo-douban-info">
        <div class="hexo-douban-title"><a target="_blank" href="https://book.douban.com/subject/27116724/"> 图解Java多线程设计模式</a></div>
        <div class="hexo-douban-meta">
        
  
  [日] 结城浩 / 侯振龙、杨文轩 / 人民邮电出版社 / 2017-8 / 89.00元

      
        </div>
        <div class="hexo-douban-meta">2018-09-22
      想读 /  程序员 多线程 Java</div>
        <div class="hexo-douban-comments">
  </div>
    </div>
</div>

        
        <div class="hexo-douban-item">
    <div class="hexo-douban-picture">
        
            <img src= "https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/loading.gif" data-lazy-src="https://img9.doubanio.com/view/subject/s/public/s29160305.jpg" data-src="https://img9.doubanio.com/view/subject/s/public/s29160305.jpg" referrerPolicy="no-referrer" />
        
    </div>
    <div class="hexo-douban-info">
        <div class="hexo-douban-title"><a target="_blank" href="https://book.douban.com/subject/26834485/"> 数据结构与算法经典问题解析</a></div>
        <div class="hexo-douban-meta">
        
  
  纳拉辛哈·卡鲁曼希 / 骆嘉伟 / 机械工业出版社 / 2016-6-1 / CNY 79.00

      
        </div>
        <div class="hexo-douban-meta">2018-09-22
      想读 /  数据结构 编程 Java</div>
        <div class="hexo-douban-comments">
  </div>
    </div>
</div>

        
        <div class="hexo-douban-item">
    <div class="hexo-douban-picture">
        
            <img src= "https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/loading.gif" data-lazy-src="https://img9.doubanio.com/view/subject/s/public/s29212016.jpg" data-src="https://img9.doubanio.com/view/subject/s/public/s29212016.jpg" referrerPolicy="no-referrer" />
        
    </div>
    <div class="hexo-douban-info">
        <div class="hexo-douban-title"><a target="_blank" href="https://book.douban.com/subject/26933281/"> 图解设计模式</a></div>
        <div class="hexo-douban-meta">
        
  
  结城浩 / 杨文轩 / 人民邮电出版社 / 2017-1-1 / CNY 79.00

      
        </div>
        <div class="hexo-douban-meta">2018-09-22
      想读 /  软件开发 Java 设计模式</div>
        <div class="hexo-douban-comments">
  </div>
    </div>
</div>

        
        <div class="hexo-douban-item">
    <div class="hexo-douban-picture">
        
            <img src= "https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/loading.gif" data-lazy-src="https://img1.doubanio.com/view/subject/s/public/s29440409.jpg" data-src="https://img1.doubanio.com/view/subject/s/public/s29440409.jpg" referrerPolicy="no-referrer" />
        
    </div>
    <div class="hexo-douban-info">
        <div class="hexo-douban-title"><a target="_blank" href="https://book.douban.com/subject/27034721/"> Java多线程编程实战指南（核心篇）</a></div>
        <div class="hexo-douban-meta">
        
  
  黄文海 / 电子工业出版社 / 2017-4 / 89

      
        </div>
        <div class="hexo-douban-meta">2018-09-22
      想读 /  Java 多线程 程序设计 Java多线程</div>
        <div class="hexo-douban-comments">
  </div>
    </div>
</div>

        
        <div class="hexo-douban-item">
    <div class="hexo-douban-picture">
        
            <img src= "https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/loading.gif" data-lazy-src="https://img2.doubanio.com/view/subject/s/public/s27283822.jpg" data-src="https://img2.doubanio.com/view/subject/s/public/s27283822.jpg" referrerPolicy="no-referrer" />
        
    </div>
    <div class="hexo-douban-info">
        <div class="hexo-douban-title"><a target="_blank" href="https://book.douban.com/subject/25863515/"> 图解HTTP</a></div>
        <div class="hexo-douban-meta">
        
  
  [日] 上野宣 / 于均良 / 人民邮电出版社 / 2014-4 / 49.00元

      
        </div>
        <div class="hexo-douban-meta">2018-09-22
      想读 / </div>
        <div class="hexo-douban-comments">
  </div>
    </div>
</div>

        
        <div class="hexo-douban-item">
    <div class="hexo-douban-picture">
        
            <img src= "https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/loading.gif" data-lazy-src="https://img9.doubanio.com/view/subject/s/public/s27458236.jpg" data-src="https://img9.doubanio.com/view/subject/s/public/s27458236.jpg" referrerPolicy="no-referrer" />
        
    </div>
    <div class="hexo-douban-info">
        <div class="hexo-douban-title"><a target="_blank" href="https://book.douban.com/subject/24722612/"> 深入理解Java虚拟机（第2版）</a></div>
        <div class="hexo-douban-meta">
        
  
  周志明 / 机械工业出版社 / 2013-9-1 / 79.00元

      
        </div>
        <div class="hexo-douban-meta">2018-09-22
      想读 / </div>
        <div class="hexo-douban-comments">
  </div>
    </div>
</div>

        
        <div class="hexo-douban-item">
    <div class="hexo-douban-picture">
        
            <img src= "https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/loading.gif" data-lazy-src="https://img1.doubanio.com/view/subject/s/public/s4399937.jpg" data-src="https://img1.doubanio.com/view/subject/s/public/s4399937.jpg" referrerPolicy="no-referrer" />
        
    </div>
    <div class="hexo-douban-info">
        <div class="hexo-douban-title"><a target="_blank" href="https://book.douban.com/subject/4889838/"> 鸟哥的Linux私房菜</a></div>
        <div class="hexo-douban-meta">
        
  
  鸟哥 / 人民邮电出版社 / 2010-6-28 / 88.00元

      
        </div>
        <div class="hexo-douban-meta">2018-09-22
      想读 /  Linux 计算机 IT Linux/Unix 计算机科学与技术 操作系统</div>
        <div class="hexo-douban-comments">
  </div>
    </div>
</div>

        
        <div class="hexo-douban-item">
    <div class="hexo-douban-picture">
        
            <img src= "https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/loading.gif" data-lazy-src="https://img1.doubanio.com/view/subject/s/public/s27269837.jpg" data-src="https://img1.doubanio.com/view/subject/s/public/s27269837.jpg" referrerPolicy="no-referrer" />
        
    </div>
    <div class="hexo-douban-info">
        <div class="hexo-douban-title"><a target="_blank" href="https://book.douban.com/subject/25867042/"> 大型网站系统与Java中间件开发实践</a></div>
        <div class="hexo-douban-meta">
        
  
  曾宪杰 / 电子工业出版社 / 2014-4-24 / 65.00

      
        </div>
        <div class="hexo-douban-meta">2018-09-22
      想读 /  java 中间件 架构 Web开发 程序设计</div>
        <div class="hexo-douban-comments">
  </div>
    </div>
</div>

        
        <div class="hexo-douban-item">
    <div class="hexo-douban-picture">
        
            <img src= "https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/loading.gif" data-lazy-src="https://img3.doubanio.com/view/subject/s/public/s6564370.jpg" data-src="https://img3.doubanio.com/view/subject/s/public/s6564370.jpg" referrerPolicy="no-referrer" />
        
    </div>
    <div class="hexo-douban-info">
        <div class="hexo-douban-title"><a target="_blank" href="https://book.douban.com/subject/6522893/"> 深入理解Java虚拟机</a></div>
        <div class="hexo-douban-meta">
        
  
  周志明 / 机械工业出版社 / 2011-6 / 69.00元

      
        </div>
        <div class="hexo-douban-meta">2018-09-22
      想读 /  深入Java虚拟机</div>
        <div class="hexo-douban-comments">
  </div>
    </div>
</div>

        
        <div class="hexo-douban-item">
    <div class="hexo-douban-picture">
        
            <img src= "https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/loading.gif" data-lazy-src="https://img9.doubanio.com/view/subject/s/public/s29237536.jpg" data-src="https://img9.doubanio.com/view/subject/s/public/s29237536.jpg" referrerPolicy="no-referrer" />
        
    </div>
    <div class="hexo-douban-info">
        <div class="hexo-douban-title"><a target="_blank" href="https://book.douban.com/subject/25953851/"> 深入分析Java Web技术内幕（修订版）</a></div>
        <div class="hexo-douban-meta">
        
  
  许令波 / 电子工业出版社 / 2014-8-1 / CNY 79.00

      
        </div>
        <div class="hexo-douban-meta">2018-09-22
      想读 /  阿里 计算机 Web</div>
        <div class="hexo-douban-comments">
  </div>
    </div>
</div>

        
        <div class="hexo-douban-pagination">
    <a class="hexo-douban-button hexo-douban-firstpage" href="javascript:;"> 首页</a>
    <a class="hexo-douban-button hexo-douban-previouspage" href="javascript:;">上一页</a>
    <span class="hexo-douban-pagenum">2 / 3</span>
    <a class="hexo-douban-button hexo-douban-nextpage" href="javascript:;">下一页</a>
    <a class="hexo-douban-button hexo-douban-lastpage" href="javascript:;">尾页</a>
</div>

    </div>
    <div id="hexo-douban-item3">
        
        <div class="hexo-douban-item">
    <div class="hexo-douban-picture">
        
            <img src= "https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/loading.gif" data-lazy-src="https://img1.doubanio.com/view/subject/s/public/s29877467.jpg" data-src="https://img1.doubanio.com/view/subject/s/public/s29877467.jpg" referrerPolicy="no-referrer" />
        
    </div>
    <div class="hexo-douban-info">
        <div class="hexo-douban-title"><a target="_blank" href="https://book.douban.com/subject/30333948/"> 码出高效：Java开发手册</a></div>
        <div class="hexo-douban-meta">
        
  
  杨冠宝、高海慧 / 电子工业出版社 / 2018-10 / 99.00元

      </div>
        <div class="hexo-douban-meta">2020-04-26
      读过 /  Java 规范 技术 编程语言 / ★★★★☆ 推荐</div>
        <div class="hexo-douban-comments">
      是一些很基础的知识，书常读常新，不过还是很有用的。
      
  

  </div>
    </div>
</div>

        
        <div class="hexo-douban-item">
    <div class="hexo-douban-picture">
        
            <img src= "https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/loading.gif" data-lazy-src="https://img9.doubanio.com/view/subject/s/public/s33645944.jpg" data-src="https://img9.doubanio.com/view/subject/s/public/s33645944.jpg" referrerPolicy="no-referrer" />
        
    </div>
    <div class="hexo-douban-info">
        <div class="hexo-douban-title"><a target="_blank" href="https://book.douban.com/subject/30231515/"> 码农翻身</a></div>
        <div class="hexo-douban-meta">
        
  
  刘欣 / 电子工业出版社 / 2018-6-1 / 69.00元

      </div>
        <div class="hexo-douban-meta">2019-12-25
      读过 /  计算机科学 技术科普 通俗 IT 程序设计 / ★★★★☆ 推荐</div>
        <div class="hexo-douban-comments">
      很基础的书籍，前段时间看了一遍，确实收获颇多。很多时候多看一些，常读常新，从不一样的角度介绍了很多基础知识。
      
  

  </div>
    </div>
</div>

        
        <div class="hexo-douban-item">
    <div class="hexo-douban-picture">
        
            <img src= "https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/loading.gif" data-lazy-src="https://img9.doubanio.com/view/subject/s/public/s29476275.jpg" data-src="https://img9.doubanio.com/view/subject/s/public/s29476275.jpg" referrerPolicy="no-referrer" />
        
    </div>
    <div class="hexo-douban-info">
        <div class="hexo-douban-title"><a target="_blank" href="https://book.douban.com/subject/26968640/"> 深入实践Spring Boot</a></div>
        <div class="hexo-douban-meta">
        
  
  陈韶健 / 机械工业出版社 / 2016-11 / 59.00

      </div>
        <div class="hexo-douban-meta">2018-09-22
      读过 /  / ★★★★★ 力荐</div>
        <div class="hexo-douban-comments">
  </div>
    </div>
</div>

        
        <div class="hexo-douban-item">
    <div class="hexo-douban-picture">
        
            <img src= "https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/loading.gif" data-lazy-src="https://img9.doubanio.com/view/subject/s/public/s28983685.jpg" data-src="https://img9.doubanio.com/view/subject/s/public/s28983685.jpg" referrerPolicy="no-referrer" />
        
    </div>
    <div class="hexo-douban-info">
        <div class="hexo-douban-title"><a target="_blank" href="https://book.douban.com/subject/26857423/"> Spring Boot实战</a></div>
        <div class="hexo-douban-meta">
        
  
  [美]克雷格·沃斯 / 丁雪丰 / 人民邮电出版社 / 2016-9 / 59.00元

      </div>
        <div class="hexo-douban-meta">2018-09-22
      读过 /  / ★★★★★ 力荐</div>
        <div class="hexo-douban-comments">
  </div>
    </div>
</div>

        
        <div class="hexo-douban-item">
    <div class="hexo-douban-picture">
        
            <img src= "https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/loading.gif" data-lazy-src="https://img2.doubanio.com/view/subject/s/public/s29640312.jpg" data-src="https://img2.doubanio.com/view/subject/s/public/s29640312.jpg" referrerPolicy="no-referrer" />
        
    </div>
    <div class="hexo-douban-info">
        <div class="hexo-douban-title"><a target="_blank" href="https://book.douban.com/subject/27605355/"> 阿里巴巴Java开发手册</a></div>
        <div class="hexo-douban-meta">
        
  
  杨冠宝 / 电子工业出版社 / 2018-1 / 35

      </div>
        <div class="hexo-douban-meta">2018-09-22
      读过 /  Java 编程 技术 计算机 / ★★★★★ 力荐</div>
        <div class="hexo-douban-comments">
      看了好几遍了。
      
  

  </div>
    </div>
</div>

        
        <div class="hexo-douban-pagination">
    <a class="hexo-douban-button hexo-douban-firstpage" href="javascript:;"> 首页</a>
    <a class="hexo-douban-button hexo-douban-previouspage" href="javascript:;">上一页</a>
    <span class="hexo-douban-pagenum">2 / 3</span>
    <a class="hexo-douban-button hexo-douban-nextpage" href="javascript:;">下一页</a>
    <a class="hexo-douban-button hexo-douban-lastpage" href="javascript:;">尾页</a>
</div>
    </div>

</div>

<script>
    (() => {
        /**
 * Created by myths on 18-2-8.
 */

Element.prototype.siblings = function () {
  const siblingElement = []
  const sibs = this.parentNode.children
  for (let i = 0; i < sibs.length; i++) {
    if (sibs[i] !== this) {
      siblingElement.push(sibs[i])
    }
  }
  return siblingElement
}
function tabClick () {
  // 修改标签样式
  this.classList.add('hexo-douban-active')
  let sibs = this.siblings()
  for (let j = 0; j < sibs.length; j++) {
    sibs[j].classList.remove('hexo-douban-active')
  }
  // 显示对应板块
  const itemId = this.id.replace('tab', 'item')
  const target = document.getElementById(itemId)
  target.classList.remove('hexo-douban-hide')
  target.classList.add('hexo-douban-show')
  sibs = document.getElementById(itemId).siblings()
  for (let k = 0; k < sibs.length; k++) {
    sibs[k].classList.remove('hexo-douban-show')
    sibs[k].classList.add('hexo-douban-hide')
  }
}
const tabs = document.getElementsByClassName('hexo-douban-tab')
for (let i = 0; i < tabs.length; i++) {
  tabs[i].onclick = tabClick
  tabs[i].onclick.apply(tabs[i])
}
tabs[2].click()

        const firstpages = document.getElementsByClassName('hexo-douban-firstpage')
const previouspages = document.getElementsByClassName('hexo-douban-previouspage')
const nextpages = document.getElementsByClassName('hexo-douban-nextpage')
const lastpages = document.getElementsByClassName('hexo-douban-lastpage')
const pagenums = document.getElementsByClassName('hexo-douban-pagenum')

function makePageNum (num, arr) {
  return (num + 1) + ' / ' + (Math.ceil(arr.length / 10 === 0 ? 1 : Math.ceil(arr.length / 10)))
}

function firstBtn () {
  const sibs = this.parentNode.siblings()
  displayPage(sibs, 0)
  this.parentNode.getElementsByClassName('hexo-douban-pagenum')[0].innerText = makePageNum(0, sibs)
}

function previousBtn () {
  const sibs = this.parentNode.siblings()
  let currNum = this.parentNode.getElementsByClassName('hexo-douban-pagenum')[0].innerText
  currNum = currNum.substr(0, currNum.indexOf('/') - 1)
  currNum = parseInt(currNum, 10) - 1
  if (currNum > 0) {
    currNum--
  }
  displayPage(sibs, currNum)
  this.parentNode.getElementsByClassName('hexo-douban-pagenum')[0].innerText = makePageNum(currNum, sibs)
}

function nextBtn () {
  const sibs = this.parentNode.siblings()
  let currNum = this.parentNode.getElementsByClassName('hexo-douban-pagenum')[0].innerText
  currNum = currNum.substr(0, currNum.indexOf('/') - 1)
  currNum = parseInt(currNum, 10) - 1
  if (currNum < Math.ceil(sibs.length / 10) - 1) {
    currNum++
  }
  displayPage(sibs, currNum)
  this.parentNode.getElementsByClassName('hexo-douban-pagenum')[0].innerText = makePageNum(currNum, sibs)
}

function lastBtn () {
  const sibs = this.parentNode.siblings()
  displayPage(sibs, Math.ceil(sibs.length / 10) - 1)
  this.parentNode.getElementsByClassName('hexo-douban-pagenum')[0].innerText = makePageNum(Math.ceil(sibs.length / 10) - 1 === -1 ? 0 : Math.ceil(sibs.length / 10) - 1, sibs)
}

function displayPage (arr, num) {
  for (let i = 0; i < arr.length; i++) {
    if (Math.floor(i / 10) === num) {
      arr[i].classList.remove('hexo-douban-hide')
      const img = arr[i].getElementsByTagName('img')[0]
      img.src = img.getAttribute('data-src')
    } else {
      arr[i].classList.add('hexo-douban-hide')
    }
  }
}

for (let i = 0; i < firstpages.length; i++) {
  // add listener
  firstpages[i].onclick = firstBtn
  previouspages[i].onclick = previousBtn
  nextpages[i].onclick = nextBtn
  lastpages[i].onclick = lastBtn

  // set page num
  const size = pagenums[i].parentNode.siblings().length
  pagenums[i].innerText = '1 / ' + (Math.ceil(size / 10) === 0 ? 1 : Math.ceil(size / 10))
  firstpages[i].click()
}

    })()
</script>

</div><hr/><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i><span> 评论</span></div></div><div class="comment-wrap"><div><div id="gitalk-container"></div></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src= "https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/404/avatar.jpg" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">liuzhihang</div><div class="author-info__description">学，然后知不足；教，然后知困。</div></div><div class="card-info-data"><div class="card-info-data-item is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">145</div></a></div><div class="card-info-data-item is-center"><a href="/tags/"><div class="headline">标签</div><div class="length-num">55</div></a></div><div class="card-info-data-item is-center"><a href="/categories/"><div class="headline">分类</div><div class="length-num">31</div></a></div></div><a class="button--animated" id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/liuzhihang"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/liuzhihang" target="_blank" title="Github"><i class="fab fa-github"></i></a><a class="social-icon" href="http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&amp;email=Vjo-Iyw_Pz43ODElFicneDU5Ow" target="_blank" title="Email"><i class="fas fa-envelope-open"></i></a><a class="social-icon" href="https://weibo.com/onlyhang" target="_blank" title="Weibo"><i class="fab fa-weibo"></i></a><a class="social-icon" href="https://twitter.com/liuzhihangs" target="_blank" title="Twitter"><i class="fab fa-twitter"></i></a><a class="social-icon" href="/atom.xml" target="_blank" title="RSS"><i class="fas fa-rss"></i></a><a class="social-icon" href="https://www.infoq.cn/u/liuzhihang/publish" target="_blank" title="InfoQ"><i class="iconfont iconweibiaoti-1"></i></a><a class="social-icon" href="https://juejin.im/user/1987506650493117" target="_blank" title="掘金"><i class="iconfont iconjuejin-1"></i></a><a class="social-icon" href="https://blog.csdn.net/qq_36535538" target="_blank" title="CSDN"><i class="iconfont iconcsdn"></i></a><a class="social-icon" href="https://www.zhihu.com/people/liuzhihang" target="_blank" title="知乎"><i class="iconfont iconzhihu1"></i></a><a class="social-icon" href="https://leetcode-cn.com/u/liuzhihang" target="_blank" title="LeetCode"><i class="iconfont iconleetcode"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn card-announcement-animation"></i><span>公告</span></div><div class="announcement_content">🧑‍💻感谢访问本站，若喜欢请收藏 ^_^ <br> <br> <img src= "https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/wechat.jpg"> <br> 个人公众号:『 程序员小航 』</div></div><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/2021/09/04/the_converter_converts_front_end_parameters_to_enumerations.html" title="使用 SpringBoot 转换器将前端参数转换为枚举"><img src= "https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/article/uztio4-T5n5Wm.jpg" onerror="this.onerror=null;this.src='https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/feature/92776_n5aac6.jpg'" alt="使用 SpringBoot 转换器将前端参数转换为枚举"/></a><div class="content"><a class="title" href="/2021/09/04/the_converter_converts_front_end_parameters_to_enumerations.html" title="使用 SpringBoot 转换器将前端参数转换为枚举">使用 SpringBoot 转换器将前端参数转换为枚举</a><time datetime="2021-09-03T23:00:00.000Z" title="发表于 2021-09-04 07:00:00">2021-09-04</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/08/22/guide_to_mapper_overloading_crater_in_mybatis_plus.html" title="MyBatis-Plus 中 Mapper 重载踩坑指南"><img src= "https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/article/ze1d2z-wXDWp0.jpg" onerror="this.onerror=null;this.src='https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/feature/92776_n5aac6.jpg'" alt="MyBatis-Plus 中 Mapper 重载踩坑指南"/></a><div class="content"><a class="title" href="/2021/08/22/guide_to_mapper_overloading_crater_in_mybatis_plus.html" title="MyBatis-Plus 中 Mapper 重载踩坑指南">MyBatis-Plus 中 Mapper 重载踩坑指南</a><time datetime="2021-08-21T23:00:00.000Z" title="发表于 2021-08-22 07:00:00">2021-08-22</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/07/25/tips_for_locking_and_optimizing_concurrent_scenes.html" title="并发场景加锁优化小技巧"><img src= "https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/article/MODJ8j-9ObHeB.jpg" onerror="this.onerror=null;this.src='https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/feature/92776_n5aac6.jpg'" alt="并发场景加锁优化小技巧"/></a><div class="content"><a class="title" href="/2021/07/25/tips_for_locking_and_optimizing_concurrent_scenes.html" title="并发场景加锁优化小技巧">并发场景加锁优化小技巧</a><time datetime="2021-07-24T23:00:00.000Z" title="发表于 2021-07-25 07:00:00">2021-07-25</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/07/16/curator-5.html" title="ZooKeeper 分布式锁 Curator 源码 05：分布式读写锁和联锁"><img src= "https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/article/EO0tci-8Ju4bN.png" onerror="this.onerror=null;this.src='https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/feature/92776_n5aac6.jpg'" alt="ZooKeeper 分布式锁 Curator 源码 05：分布式读写锁和联锁"/></a><div class="content"><a class="title" href="/2021/07/16/curator-5.html" title="ZooKeeper 分布式锁 Curator 源码 05：分布式读写锁和联锁">ZooKeeper 分布式锁 Curator 源码 05：分布式读写锁和联锁</a><time datetime="2021-07-16T13:30:30.000Z" title="发表于 2021-07-16 21:30:30">2021-07-16</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/07/15/curator-4.html" title="ZooKeeper 分布式锁 Curator 源码 04：分布式信号量和互斥锁"><img src= "https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/loading.gif" data-lazy-src="https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/article/EO0tci-8Ju4bN.png" onerror="this.onerror=null;this.src='https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/feature/92776_n5aac6.jpg'" alt="ZooKeeper 分布式锁 Curator 源码 04：分布式信号量和互斥锁"/></a><div class="content"><a class="title" href="/2021/07/15/curator-4.html" title="ZooKeeper 分布式锁 Curator 源码 04：分布式信号量和互斥锁">ZooKeeper 分布式锁 Curator 源码 04：分布式信号量和互斥锁</a><time datetime="2021-07-15T13:30:30.000Z" title="发表于 2021-07-15 21:30:30">2021-07-15</time></div></div></div></div><div class="card-widget" id="card-newest-comments"><div class="item-headline"><i class="fas fa-comment-dots"></i><span>最新评论</span></div><div class="aside-list"><span>正在加载中...</span></div></div><div class="card-widget card-categories"><div class="item-headline">
            <i class="fas fa-folder-open"></i>
            <span>分类</span>
            <a class="card-more-btn" href="/categories/" title="查看更多">
    <i class="fas fa-angle-right"></i></a>
            </div>
            <ul class="card-category-list" id="aside-cat-list">
            <li class="card-category-list-item "><a class="card-category-list-link" href="/categories/ELK/"><span class="card-category-list-name">ELK</span><span class="card-category-list-count">10</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/IDEA/"><span class="card-category-list-name">IDEA</span><span class="card-category-list-count">4</span></a></li><li class="card-category-list-item parent"><a class="card-category-list-link" href="/categories/Redis/"><span class="card-category-list-name">Redis</span><span class="card-category-list-count">1</span><i class="fas fa-caret-left "></i></a><ul class="card-category-list child"><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Redis/cache/"><span class="card-category-list-name">cache</span><span class="card-category-list-count">1</span></a></li></ul></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Spring/"><span class="card-category-list-name">Spring</span><span class="card-category-list-count">6</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/docker/"><span class="card-category-list-name">docker</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/hexo/"><span class="card-category-list-name">hexo</span><span class="card-category-list-count">3</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/issue/"><span class="card-category-list-name">issue</span><span class="card-category-list-count">9</span></a></li>
            </ul></div><div class="card-widget card-tags"><div class="item-headline"><i class="fas fa-tags"></i><span>标签</span></div><div class="card-tag-cloud"><a href="/tags/%E5%A4%9A%E7%BA%BF%E7%A8%8B/" style="font-size: 1.24em; color: rgb(27, 61, 172)">多线程</a><a href="/tags/%E7%BA%BF%E7%A8%8B%E6%B1%A0/" style="font-size: 1.15em; color: rgb(31, 46, 195)">线程池</a><a href="/tags/%E5%88%86%E5%B8%83%E5%BC%8F/" style="font-size: 1.3em; color: rgb(136, 63, 41)">分布式</a><a href="/tags/volatile/" style="font-size: 1.15em; color: rgb(78, 150, 108)">volatile</a><a href="/tags/%E6%B5%81%E6%B0%B4%E5%8F%B7/" style="font-size: 1.15em; color: rgb(97, 116, 54)">流水号</a><a href="/tags/%E9%9B%AA%E8%8A%B1%E7%AE%97%E6%B3%95/" style="font-size: 1.15em; color: rgb(153, 3, 140)">雪花算法</a><a href="/tags/%E5%B7%A5%E4%BD%9C%E7%AC%94%E8%AE%B0/" style="font-size: 1.36em; color: rgb(71, 56, 184)">工作笔记</a><a href="/tags/ELK/" style="font-size: 1.39em; color: rgb(173, 103, 93)">ELK</a><a href="/tags/mysql/" style="font-size: 1.27em; color: rgb(158, 27, 189)">mysql</a><a href="/tags/docker/" style="font-size: 1.15em; color: rgb(49, 71, 145)">docker</a><a href="/tags/hexo/" style="font-size: 1.21em; color: rgb(39, 159, 158)">hexo</a><a href="/tags/%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F/" style="font-size: 1.27em; color: rgb(121, 128, 34)">设计模式</a><a href="/tags/%E5%8D%95%E4%BE%8B%E6%A8%A1%E5%BC%8F/" style="font-size: 1.18em; color: rgb(71, 16, 19)">单例模式</a><a href="/tags/issue/" style="font-size: 1.27em; color: rgb(103, 35, 165)">issue</a><a href="/tags/error/" style="font-size: 1.15em; color: rgb(187, 170, 18)">error</a><a href="/tags/ip/" style="font-size: 1.15em; color: rgb(110, 109, 195)">ip</a><a href="/tags/mac/" style="font-size: 1.21em; color: rgb(111, 162, 110)">mac</a><a href="/tags/brew/" style="font-size: 1.15em; color: rgb(16, 73, 142)">brew</a><a href="/tags/software/" style="font-size: 1.15em; color: rgb(99, 166, 64)">software</a><a href="/tags/%E5%B7%A5%E5%85%B7%E5%86%8C/" style="font-size: 1.33em; color: rgb(85, 49, 104)">工具册</a><a href="/tags/markdown/" style="font-size: 1.15em; color: rgb(4, 182, 111)">markdown</a><a href="/tags/%E5%B0%8F%E6%8A%80%E5%B7%A7/" style="font-size: 1.15em; color: rgb(87, 63, 123)">小技巧</a><a href="/tags/plugin/" style="font-size: 1.27em; color: rgb(112, 41, 166)">plugin</a><a href="/tags/IDEA/" style="font-size: 1.15em; color: rgb(58, 7, 103)">IDEA</a><a href="/tags/next-key/" style="font-size: 1.24em; color: rgb(35, 44, 24)">next-key</a><a href="/tags/interceptor/" style="font-size: 1.15em; color: rgb(16, 136, 140)">interceptor</a><a href="/tags/Spring/" style="font-size: 1.42em; color: rgb(51, 65, 71)">Spring</a><a href="/tags/servlet/" style="font-size: 1.15em; color: rgb(34, 102, 91)">servlet</a><a href="/tags/%E5%8A%A8%E6%80%81%E4%BB%A3%E7%90%86/" style="font-size: 1.18em; color: rgb(200, 176, 26)">动态代理</a><a href="/tags/aop/" style="font-size: 1.15em; color: rgb(89, 102, 61)">aop</a><a href="/tags/JWT/" style="font-size: 1.15em; color: rgb(39, 109, 92)">JWT</a><a href="/tags/SpringSecurity/" style="font-size: 1.15em; color: rgb(146, 37, 199)">SpringSecurity</a><a href="/tags/transactional/" style="font-size: 1.15em; color: rgb(37, 63, 196)">transactional</a><a href="/tags/Redis/" style="font-size: 1.15em; color: rgb(53, 73, 15)">Redis</a><a href="/tags/cache/" style="font-size: 1.15em; color: rgb(147, 90, 144)">cache</a><a href="/tags/%E9%93%BE%E8%B7%AF%E8%BF%BD%E8%B8%AA/" style="font-size: 1.15em; color: rgb(27, 108, 31)">链路追踪</a><a href="/tags/Archetype/" style="font-size: 1.15em; color: rgb(131, 37, 136)">Archetype</a><a href="/tags/Doc-View/" style="font-size: 1.3em; color: rgb(108, 91, 182)">Doc View</a><a href="/tags/skywalking/" style="font-size: 1.15em; color: rgb(78, 177, 5)">skywalking</a><a href="/tags/%E6%BA%90%E7%A0%81%E7%AC%94%E8%AE%B0/" style="font-size: 1.45em; color: rgb(10, 188, 19)">源码笔记</a></div></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>归档</span><a class="card-more-btn" href="/archives/" title="查看更多">
    <i class="fas fa-angle-right"></i></a></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/09/"><span class="card-archive-list-date">九月 2021</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/08/"><span class="card-archive-list-date">八月 2021</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/07/"><span class="card-archive-list-date">七月 2021</span><span class="card-archive-list-count">14</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/06/"><span class="card-archive-list-date">六月 2021</span><span class="card-archive-list-count">9</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/05/"><span class="card-archive-list-date">五月 2021</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/04/"><span class="card-archive-list-date">四月 2021</span><span class="card-archive-list-count">4</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/03/"><span class="card-archive-list-date">三月 2021</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/02/"><span class="card-archive-list-date">二月 2021</span><span class="card-archive-list-count">3</span></a></li></ul></div><div class="card-widget card-webinfo"><div class="item-headline"><i class="fas fa-chart-line"></i><span>网站资讯</span></div><div class="webinfo"><div class="webinfo-item"><div class="item-name">文章数目 :</div><div class="item-count">145</div></div><div class="webinfo-item"><div class="item-name">本站总字数 :</div><div class="item-count">148.2k</div></div><div class="webinfo-item"><div class="item-name">本站访客数 :</div><div class="item-count" id="busuanzi_value_site_uv"></div></div><div class="webinfo-item"><div class="item-name">本站总访问量 :</div><div class="item-count" id="busuanzi_value_site_pv"></div></div><div class="webinfo-item"><div class="item-name">最后更新时间 :</div><div class="item-count" id="last-push-date" data-lastPushDate="2021-09-08T09:05:43.976Z"></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2017 - 2021 By liuzhihang</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div><div class="footer_custom_text"><a target="_blank" rel="noopener" href="http://www.beian.miit.gov.cn/"><img class="icp-icon" src= "https://cdn.jsdelivr.net/gh/liuzhihang/oss/pic/loading.gif" data-lazy-src="/resources/image/icp.png"><span>备案号：京ICP备20000888号</span></a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="translateLink" type="button" title="简繁转换">繁</button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><a id="to_comment" href="#post-comment" title="直达评论"><i class="fas fa-comments"></i></a><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div id="local-search"><div class="search-dialog"><div class="search-dialog__title" id="local-search-title">本地搜索</div><div id="local-input-panel"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div></div><hr/><div id="local-search-results"></div><span class="search-close-button"><i class="fas fa-times"></i></span></div><div id="search-mask"></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="/js/tw_cn.js"></script><script src="https://cdn.jsdelivr.net/npm/instant.page/instantpage.min.js" type="module"></script><script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload/dist/lazyload.iife.min.js"></script><script src="/js/search/local-search.js"></script><div class="js-pjax"><script>if (document.getElementsByClassName('mermaid').length) {
  if (window.mermaidJsLoad) mermaid.init()
  else {
    getScript('https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js').then(() => {
      window.mermaidJsLoad = true
      mermaid.initialize({
        theme: 'default',
      })
      false && mermaid.init()
    })
  }
}</script><script>function addGitalkSource () {
  const ele = document.createElement('link')
  ele.rel = 'stylesheet'
  ele.href= 'https://cdn.jsdelivr.net/npm/gitalk/dist/gitalk.min.css'
  document.getElementsByTagName('head')[0].appendChild(ele)
}

function loadGitalk () {
  function initGitalk () {
    var gitalk = new Gitalk(Object.assign({
      clientID: 'e48f300349e2ac2d03bd',
      clientSecret: '001c669e6269dfd9d7d9fef029cc71fd00ea69e3',
      repo: 'comments',
      owner: 'liuzhihang',
      admin: ['liuzhihang'],
      id: '9f67cb036a71e96275b2f7be08ca12e9',
      language: 'en',
      perPage: 10,
      distractionFreeMode: false,
      pagerDirection: 'last',
      createIssueManually: false,
      updateCountCallback: commentCount
    },null))

    gitalk.render('gitalk-container')
  }

  if (typeof Gitalk === 'function') initGitalk()
  else {
    addGitalkSource()
    getScript('https://cdn.jsdelivr.net/npm/gitalk@latest/dist/gitalk.min.js').then(initGitalk)
  }
}

function commentCount(n){
  let isCommentCount = document.querySelector('#post-meta .gitalk-comment-count')
  if (isCommentCount) {
    isCommentCount.innerHTML= n
  }
}

if ('Gitalk' === 'Gitalk' || !false) {
  if (false) btf.loadComment(document.getElementById('gitalk-container'), loadGitalk)
  else loadGitalk()
} else {
  function loadOtherComment () {
    loadGitalk()
  }
}</script></div><script>window.addEventListener('load', () => {
  const changeContent = (content) => {
    if (content === '') return content

    content = content.replace(/<img.*?src="(.*?)"?[^\>]+>/ig, '[图片]') // replace image link
    content = content.replace(/<a[^>]+?href=["']?([^"']+)["']?[^>]*>([^<]+)<\/a>/gi, '[链接]') // replace url
    content = content.replace(/<pre><code>.*?<\/pre>/gi, '[代码]') // replace code
    content = content.replace(/<[^>]+>/g,"") // remove html tag

    if (content.length > 150) {
      content = content.substring(0,150) + '...'
    }
    return content
  }

  const findTrueUrl = (array) => {
    Promise.all(array.map(item =>
      fetch(item.url).then(resp => resp.json()).then(data => {
        const urlArray = data.body.match(/(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?/ig)
        if (data.user.login === 'utterances-bot') {
          return urlArray.pop()
        } else {
          return urlArray.shift()
        }
      })
    )).then(res => {
        array = array.map((i,index)=> {
          return {
            ...i,
            url: res[index]
          }
        })

        saveToLocal.set('github-newest-comments', JSON.stringify(array), 10/(60*24))
        generateHtml(array)
    });
  }

  const getComment = () => {
    fetch('https://api.github.com/repos/liuzhihang/comments/issues/comments?sort=updated&direction=desc&per_page=6&page=1',{
      "headers": {
        Accept: 'application/vnd.github.v3.html+json'
      }
    })
      .then(response => response.json())
      .then(data => {
        const githubArray = data.map(item => {
          return {
            'avatar': item.user.avatar_url,
            'content': changeContent(item.body_html),
            'nick': item.user.login,
            'url': item.issue_url,
            'date': item.updated_at,
            'githubUrl': item.html_url
          }
        })
        findTrueUrl(githubArray)
      }).catch(e => {
        const $dom = document.querySelector('#card-newest-comments .aside-list')
        $dom.innerHTML= "无法获取评论，请确认相关配置是否正确"
      })
  }

  const generateHtml = array => {
    let result = ''

    if (array.length) {
      for (let i = 0; i < array.length; i++) {
        result += '<div class=\'aside-list-item\'>'

        if (true) {
          const name = 'data-lazy-src'
          result += `<a href='${array[i].url}' class='thumbnail'><img ${name}='${array[i].avatar}' alt='${array[i].nick}'></a>`
        }

        result += `<div class='content'>
        <a class='comment' href='${array[i].url}'>${array[i].content}</a>
        <div class='name'><span>${array[i].nick} / </span><time datetime="${array[i].date}">${btf.diffDate(array[i].date, true)}</time></div>
        </div></div>`
      }
    } else {
      result += '没有评论'
    }

    let $dom = document.querySelector('#card-newest-comments .aside-list')
    $dom.innerHTML= result
    window.lazyLoadInstance && window.lazyLoadInstance.update()
    window.pjax && window.pjax.refresh($dom)
  }

  const newestCommentInit = () => {
    if (document.querySelector('#card-newest-comments .aside-list')) {
      const data = saveToLocal.get('github-newest-comments')
      if (data) {
        generateHtml(JSON.parse(data))
      } else {
        getComment()
      }
    }
  }

  newestCommentInit()
  document.addEventListener('pjax:complete', newestCommentInit)
})</script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div></body></html>